from django.db import models

# Create your models here.


class MeituanSpider(models.Model):
    shopId = models.CharField(max_length=255)
    image = models.CharField(max_length=255)
    title = models.CharField(max_length=255)
    score = models.FloatField(max_length=3)
    commentNum = models.IntegerField()
    address = models.CharField(max_length=255)
    avgPrice = models.IntegerField()
    deal = models.TextField(null=True, blank=True)
    shopUrl = models.CharField(max_length=255)
    city = models.CharField(max_length=255)

    def __str__(self):
        return self.city + ':' + self.title


class User(models.Model):
    name = models.CharField(max_length=255)
    user = models.CharField(max_length=255)
    password = models.CharField(max_length=255)
    email = models.CharField(max_length=255)

    def __str__(self):
        return self.user